Skip to content

cmd: Pass configFile, not configFlag, for reload command#7532

Merged
mholt merged 2 commits intomasterfrom
config-flag
Feb 27, 2026
Merged

cmd: Pass configFile, not configFlag, for reload command#7532
mholt merged 2 commits intomasterfrom
config-flag

Conversation

@mholt
Copy link
Member

@mholt mholt commented Feb 27, 2026

This should fix #7528.

I believe we don't need configFlag after we pass it into LoadConfig(), which uses it to load the config, and we get the resulting configFile used from that function.

Without this patch, caddy reload was definitely not using the adjacent Caddyfile unless I did caddy reload --config Caddyfile, which shouldn't be necessary.

Assistance Disclosure

No AI was used. Just my dumb self

}

adminAddr, err := DetermineAdminAPIAddress(addressFlag, config, configFlag, configAdapterFlag)
adminAddr, err := DetermineAdminAPIAddress(addressFlag, config, configFile, configAdapterFlag)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫠 well that's an embarassing mistake

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done worse. Way worse 🤣

@francislavoie francislavoie added the bug 🐞 Something isn't working label Feb 27, 2026
@francislavoie francislavoie added this to the v2.11.2 milestone Feb 27, 2026
@mholt mholt merged commit cd9e166 into master Feb 27, 2026
38 checks passed
@mholt mholt deleted the config-flag branch February 27, 2026 22:24
@github-actions github-actions bot mentioned this pull request Mar 6, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Caddy 2.11 HTTP 403 error via docker exec caddy reload

2 participants